package com.alien.admin.modules.gitlab.service;

import com.alien.admin.modules.deploy.domain.DeployRec;
import com.alien.admin.modules.deploy.domain.DpServer;
import com.alien.admin.modules.gitlab.service.dto.MergeBranch;
import org.gitlab4j.api.GitLabApiException;
import org.gitlab4j.api.models.Branch;
import org.gitlab4j.api.models.Tag;

import java.util.List;

public interface GitlabService {

    List<Branch> queryBranchList(DpServer dpServer) throws GitLabApiException;

    List<Tag> queryTagList(DpServer dpServer) throws GitLabApiException;

    String mergeBranch(MergeBranch mergeBranch) throws GitLabApiException;

    void rollbackBranch(String branchName, String env, Integer projectId) throws GitLabApiException;

    String mergeBranch(String privateToken, MergeBranch mergeBranch) throws GitLabApiException;

    void rollbackBranch(String privateToken, String branchName, String env, Integer projectId) throws GitLabApiException;

    void deleteBranch(String privateToken, Integer projectId, String env, String branchName) throws GitLabApiException;
}
